package com.thx.common.dto;

import java.util.List;

/**
 * 通用树状数据模型
 *
 * @author balancejia
 *
 */
public class TreeNode {
  protected String id;
  protected String name;
  protected String type;
  protected boolean isVal;
  protected List<TreeNode> children;

  public boolean isVal() {
    return isVal;
  }

  public void setVal(boolean isVal) {
    this.isVal = isVal;
  }

  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public String getType() {
    return type;
  }

  public void setType(String type) {
    this.type = type;
  }

  public List<TreeNode> getChildren() {
    return children;
  }

  public void setChildren(List<TreeNode> children) {
    this.children = children;
  }

  public TreeNode(String id, String name, String type) {
    this.id = id;
    this.name = name;
    this.type = type;
    this.isVal = false;
  }

  public TreeNode(String id, String name, String type, boolean isVal) {
    this.id = id;
    this.name = name;
    this.type = type;
    this.isVal = isVal;
  }

  public TreeNode() {

  }
}
